﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace sy2_2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        double f, c;

        private void button1_Click(object sender, EventArgs e)
        {
            f = Convert.ToDouble(textBox1.Text);
            c = 5.0 / 9 * (f - 32);
            textBox2.Text = c.ToString();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            c = Convert.ToDouble(textBox2.Text);
            f = (9.0 / 5 * c + 32);
            textBox1.Text = f.ToString();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
        }
    }
}
